How to detect radioBox button selection after launching DB ?

I am writing a dxl that launches a dialog box which has multiple fields/tabs etc. .

I would like to find a way to enable my dxl to know when a user has selected a certain radioBox selection.

Currently, I am using an extra Dialog box button for " update " purposes. Currently, whenever the user selects a different radio selection they must then press this other button so that the call-back function executes.

Ideally, I would like the user to be able to select a different radioBox selection and have the dxl automatically execute a call back function.

Does anyone know of a way to do this?

A screen shot is attached if you would like to see what the box looks like. The "update" button and the current radio selections are highlighted.
Thanks
jmina - Thu Feb 09 21:04:16 EST 2012

Re: How to detect radioBox button selection after launching DB ?
Mathias Mamsch - Fri Feb 10 05:47:06 EST 2012

In DXL all dialog box elements support an 'on change' callback, that can be defined using 'set'.
 

string toppings[] = { "Beef", "Cheese", "Pepperoni", "Sausage" }
DB pizzaDB = create "Pizza Box"
DBE radioBoxDBE = radioBox (pizzaDB, "Topping", toppings, 2)
DBE myList      = list (pizzaDB, "Topping", 150, 3, toppings, 4)
// callback that will be called when the radio box value changes
void doRadioBox(DBE dbe) {
    int nr = get radioBoxDBE
        print "Topping " (toppings[nr]) ".was selected ...\n"
}
 
void doSelectList (DBE dbe) {
        int nr = get myList
        print "List selection changed: " toppings[nr] "\n"
}
 
void doActivateList (DBE dbe) {
        int nr = get myList
        print "List Activation: " toppings[nr] "\n"
}
 
set(radioBoxDBE, doRadioBox)    // set 'change' callback 
set(myList, doSelectList, doActivateList) // lists support single click and double click callbacks
 
show pizzaDB

 


You can do the same for checkboxes,fields, date pickers, etc. Hope that helps, regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Re: How to detect radioBox button selection after launching DB ?
jmina - Fri Feb 10 11:03:25 EST 2012

Mathias Mamsch - Fri Feb 10 05:47:06 EST 2012

In DXL all dialog box elements support an 'on change' callback, that can be defined using 'set'.
 

string toppings[] = { "Beef", "Cheese", "Pepperoni", "Sausage" }
DB pizzaDB = create "Pizza Box"
DBE radioBoxDBE = radioBox (pizzaDB, "Topping", toppings, 2)
DBE myList      = list (pizzaDB, "Topping", 150, 3, toppings, 4)
// callback that will be called when the radio box value changes
void doRadioBox(DBE dbe) {
    int nr = get radioBoxDBE
        print "Topping " (toppings[nr]) ".was selected ...\n"
}
 
void doSelectList (DBE dbe) {
        int nr = get myList
        print "List selection changed: " toppings[nr] "\n"
}
 
void doActivateList (DBE dbe) {
        int nr = get myList
        print "List Activation: " toppings[nr] "\n"
}
 
set(radioBoxDBE, doRadioBox)    // set 'change' callback 
set(myList, doSelectList, doActivateList) // lists support single click and double click callbacks
 
show pizzaDB

 


You can do the same for checkboxes,fields, date pickers, etc. Hope that helps, regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Mathias:
Thanks for your quick response ; I did not know that the DXL community was so speedy!
Thank you so much! This is exactly what I was looking for !!! AWESOME !